<template>
  <a-modal
    :title="title"
    :width="width"
    :visible="visible"
    :maskClosable="false"
    :confirmLoading="confirmLoading"
    @cancel="handleCancel"
    :footer="null"
    cancelText="关闭">
    <a-spin :spinning="confirmLoading">
  <aplayer autoplay :music="{
  title: fileName,
  author: ' ',
  url: url,
  pic: '无',
  lrc: '[00:00.00]lrc here\n[00:01.00]aplayer'
}">
  </aplayer>
    </a-spin>
  </a-modal>
</template>

<script>
  import Aplayer from 'vue-aplayer'
  import { httpAction } from '@/api/manage'
    export default {
        name: "GlrResourceListening",
      visible: false,
      width:800,
      components: {
        Aplayer
      },
      data () {
        return {
          title:"操作",
          width:800,
          visible: false,
          confirmLoading: false,
          url:'',
          fileName:''
        }
      },
      methods:{
        handleCancel () {
          this.close()
        },
        edit (record) {
          this.visible = true;
          this.url=`${window._CONFIG['domianURL']}/`+record.filePath;
          this.fileName=record.fileName;
        },
        close () {
          this.$emit('close');
          this.visible = false;
        },
      }
    }
</script>

<style scoped>

</style>